package com.neusoft.bizcore.activiti.service;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.neusoft.bizcore.activiti.dto.PendingDataDTO;
import com.neusoft.bizcore.activiti.dto.ServiceDataModelDTO;
import com.neusoft.bizcore.activiti.enums.PendingDataStatusEnum;
import com.neusoft.bizcore.web.support.Searchable;

public interface PendingDataService {

    List<PendingDataDTO> index(Searchable searchable);

    Page<PendingDataDTO> search(Pageable pageable, Searchable searchable);

    /**
     * 保存
     *
     * @param clazzName 处理数据的业务类的全类名
     * @param methodName 处理数据的业务类的方法名
     * @param workNum 工单号
     * @param taskId 任务号
     * @param list 数据集合
     * @return
     */
    PendingDataDTO save(String clazzName, String methodName, String workNum, String taskId,
            List<ServiceDataModelDTO> list);

    PendingDataDTO create(PendingDataDTO dto);

    PendingDataDTO update(Long id, PendingDataDTO dto);

    PendingDataDTO details(Long id);

    void delete(Long id);

    List<PendingDataDTO> findByClazzName(String clazzName);

    List<PendingDataDTO> findByWorkNum(String WorkNum);

    PendingDataDTO updateStatus(Long id, PendingDataStatusEnum status);

    List<PendingDataDTO> findByInstanceId(String instanceId);

    void deleteByWorkNum(String workNum);

    void deleteByWorkNumAndNodeId(String workNum, String nodeId);

    String dealData(String processInstanceId);

}
